

package com.hexinfo.dmpro.script.publish.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hexinfo.dmpro.common.base.PageResult;
import com.hexinfo.dmpro.script.publish.entity.ScriptPublishVersionEntity;

import java.util.List;

/**
 * 脚本发布任务
 *
 * @author Wang zhihao
 * @date 2023-09-13 18:16:07
 */
public interface IScriptPublishVersionService extends IService<ScriptPublishVersionEntity> {

    /**
     * @Method queryList
     * @Param
     * @param page
     * @param ScriptPublishVersion
     * @Return com.hexinfo.dmpro.common.base.PageResult
     * @Description 分页查询脚本发布任务并返回PageResult类型的数据
     * @Author Wang zhihao
     * @Date 2023/9/14 17:10
     * @Version V1.0
     */
    PageResult queryList(Page page, ScriptPublishVersionEntity ScriptPublishVersion);

    /**
     * @Method removeByIds
     * @Param
     * @param ids
     * @Return void
     * @Description 批量删除
     * @Author Wang zhihao
     * @Date 2023/9/14 19:07
     * @Version V1.0
     */
    void removeByIds(List<String> ids);

    /**
     * @Method removeById
     * @Param
     * @param id
     * @Return void
     * @Description 根据ID删除
     * @Author Wang zhihao
     * @Date 2023/11/13 16:36
     * @Version V1.0
     */
    void removeById(String id);

    /**
     * @Method publish
     * @Param
     * @param ScriptPublishVersion
     * @param clusterIds
     * @param publishUser
     * @Return void
     * @Description 发布
     * @Author Wang zhihao
     * @Date 2023/10/16 17:26
     * @Version V1.0
     */
    void publish(ScriptPublishVersionEntity ScriptPublishVersion, String serverIds, String clusterIds, String publishUser);

    /**
     * @Method getUserListByCluster
     * @Param
     * @Return java.util.List<java.lang.String>
     * @Description 根据集群获取脚本发布可选用户列表
     * @Author Wang zhihao
     * @Date 2024/1/10 14:43
     * @Version V1.0
     */
    List<String> getUserListByCluster(String clusterName);
    //通过集群id和登录用户获取脚本发布用户列表
    List<String> getUserListByClusterAndId(String serverId,List<String> ids);
}
